Add integration and unit tests for monitoring JSON API endpoints#373
Add integration and unit tests for monitoring JSON API endpoints#373gimballock wants to merge 1 commit intostratum-mining:mainfrom
Conversation
85a3f7e to
f7f95d2
Compare
f7f95d2 to
f3c2e96
Compare
Shourya742
left a comment
There was a problem hiding this comment.
Shouldn't monitoring module have abstractions for most of these?
f3c2e96 to
1f12145
Compare
|
I think the test failure here is the target of PR #338, once we rebase off of that this failure should go away i think. |
Shourya742
left a comment
There was a problem hiding this comment.
I still dont see any changes requested. Now, we have some random files in the PR
d7dfb76 to
65dd528
Compare
My bad, all those extra files are removed now. |
1f5ce90 to
6ecedf7
Compare
|
Rebased onto main and addressed all review feedback. Summary of changes in the current commit: All review feedback addressed:
Additional cleanup done during rebase:
@Shourya742 if you could take a look when you have a chance |
|
Note:when running the monitoring integration tests sequentially ( |
- Add typed response structs for JSON API parsing (minimal fields only) - Add typed polling functions to replace stringly-typed JSON access - Add prometheus_metrics_assertions module with polling helpers - Add #[track_caller] to assert helpers for better debugging - Add shutdown calls to all integration tests - Use POLL_TIMEOUT constant instead of magic numbers - Add unit tests for http_server.rs endpoints
6ecedf7 to
cf90755
Compare
|
Thanks for investigating. I believe this is pre-existing and unrelated to this PR — opened #430 to track it. Looking at the code, This PR's tests use isolated ports via |
Closes #329
Exercise every JSON REST API endpoint against live SV2 topologies and strengthen unit-test coverage for edge cases.
Integration tests (monitoring_integration.rs):
Assertion helpers (prometheus_metrics_assertions.rs):
HTTP helper (utils.rs):
Unit tests (http_server.rs):
Dependencies: